﻿using BaseLib.Helper;
using System;
using System.Web.Configuration;

namespace WebUI
{
    public partial class Index : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            var flag = ((CompilationSection)WebConfigurationManager.OpenWebConfiguration("/web.config").GetSection("system.web/compilation")).Debug;
            Exception error = null;
            try
            {
                var templatefile = Request.QueryString["tpl"];
                if (!templatefile.IsNullOrWhiteSpace()) this.PlaceHolder1.Controls.Add(this.Page.LoadControl(templatefile));
                if (flag) this.LabelInfos.Text = (" nodeId:" + Request.QueryString["nodeid"] + " infoId:" + Request.QueryString["infoid"] + " nodeType:" + Request.QueryString["nodetype"] + " templateFile:" + templatefile + "-");
            }
            catch (Exception err)
            {
                error = err;
            }
            if (flag) this.LabelError.Text = string.Format("{0} - {1}", arg0: !error.IsNullOrWhiteSpace() ? error + "" : "", arg1: (Request.QueryString.Count == 0 ? "" : " QueryString:" + Request.QueryString));
        }
    }
}